#ifndef __TASK_QUEUE_V1YOH0KG
#define __TASK_QUEUE_V1YOH0KG


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#define MAX_NUM 500 

typedef enum notifyType{
	EVENT_NOTIFY = 0,
	OBJECT_NOTIFY,
	STATS_REQUEST
}notifyType_e;

typedef struct cms_stats_s{
	uint32_t objID;
	uint64_t objIA;
	uint32_t srcModId;
	long  msgType;		      //record msg type
	struct timespec timeStamp; /*record the time of send message*/
}cms_stats_t;

typedef struct data_s{
	uint32_t id; 			/*store event id or shmid of objchang*/
	uint32_t type;			/*event content type*/
	notifyType_e nType; 	/*notify type*/
	uint8_t *value;			/*event content*/
	cms_stats_t statInfo;
	//void *msg;
}data_t;

typedef struct cmsQueue_s{
	data_t *data;
	int front;
	int rear;
}cmsQueue_t;

cmsQueue_t *queue_create(int size);
int is_queue_empty(cmsQueue_t *qHandle);
int is_queue_full(cmsQueue_t *qHandle);
int en_queue(cmsQueue_t *qHandle, data_t data);
int de_queue(cmsQueue_t *qHandle, data_t *data);
int destory_queue(cmsQueue_t *qHandle);


#endif /* end of include guard: __TASK_QUEUE_V1YOH0KG */
